<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>上下高度固定中间固定</title>
    <style>
        html,body{
            height: 100%;
            padding: 0;
            margin: 0;
        }
        #container{
            display: flex;
            flex-direction: column;
            height: 98.5%;
        }
        #content-view{
            display: flex;
            flex-direction: column;
            height: 98.5%;
        }
        #content{
            flex: 1;
            overflow: auto;
        }
        #user-content{
            height: 1200px;
            background-color: aqua;
        }
    </style>
</head>
<body>
    <div id="container">
      <div id="content-view">
        <div id="header">
            我是header
        </div>  
        <div id="content">
            我是content
            <div id="user-content">
                使用Flex实现上下固定，中间内容溢出会滚动的布局
            </div>
            
        </div>
      </div>
      <div id="footer">
            我是footer
      </div>
    </div>
</body>
</html>